<template>
	<view class="">
		<view class="avator">
			<image :src="info.logo" mode="aspectFill"></image>
		</view>
		<view class="desc">
			{{info.description}}
		</view>
		<view class="list">
			<view class="item flex justify align">
				<view class="item_title">
					客服电话
				</view>
				<view class="">
					<text class="tel" @tap="toCall">{{info.phone}}</text>
					<text>（微信同号）</text>
				</view>
			</view>
			<view class="item flex justify align">
				<view class="item_title">
					版本号
				</view>
				<view class="">
					{{info.version}}
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	const app = getApp()
	export default {
		data() {
			return {
				tel:'123123',
				edition:'1.00',
				info: {}
			}
		},
		onLoad() {
			this.getInfo()
		},
		onShow() {
			
		},
		methods: {
			getInfo(){
				app.getData('api/config_basic/index',{name:'about_us'}).then(res=>{
					console.log(res)
					this.info = res.data.data
				})
			},
			// 拨打电话
			toCall(){
				uni.makePhoneCall({
					phoneNumber: this.info.phone //仅为示例
				});
			}
		}
	}
</script>

<style lang="scss">
	page{
		background: #F7F7F7;
	}
	.avator{
		text-align: center;
	}
	.avator image{
		width: 120rpx;
		height: 120rpx;
		border-radius: 50%;
		margin: 56rpx 0;
	}
	.desc{
		line-height: 46rpx;
		margin: 0 40rpx 80rpx;
	}
	
	.item{
		height: 90rpx;
		padding: 0 28rpx;
		border-bottom: 1rpx solid #eee;
		background: #fff;
		color: #999;
		.item_title{
			color: #333;
		}
		.tel{
			color: var(--base);
		}
	}
	.item:last-child{
		border-bottom: 0;
	}
	
</style>